<template>
  <div class="device_multi_selection">
    <el-button @click="openDialog">选择巡检项目</el-button>
    <el-dialog title="选择巡检项目" :visible.sync="dialog_visible" class="jc_dialog_wrap jc_dialog_item el-dialog--middle">
      <el-form class="jc_search_wrap" v-model="searchList">
        <label>设备类别</label>
        <el-select placeholder="请选择" v-model="pl88">
          <el-option label="可用" value="enabled"></el-option>
          <el-option label="不可用" value="disabled"></el-option>
        </el-select>
        <label>巡检项目</label><el-input></el-input>
        <el-button @click=""><i class="el-icon-search"></i>搜索</el-button>
      </el-form>
      <el-table :data="testData"  element-loading-text="拼命加载中" border fit highlight-current-row class="jc_table_wrap" ref="multipleTable" @selection-change="handleSelectionChange">
        <el-table-column  type="selection" width="200px" >
        </el-table-column>
        <el-table-column label='设备类型'>
          <template scope="scope">
            {{scope.row.id}}
          </template>
        </el-table-column>
        <el-table-column label="巡检项目">
          <template scope="scope">
            {{scope.row.description}}
          </template>
        </el-table-column>
        <el-table-column label="项目类型">
          <template scope="scope">
            {{scope.row.name}}
          </template>
        </el-table-column>
        <el-table-column label="巡检标准">
          <template scope="scope">
          </template>
        </el-table-column>
        <el-table-column label="备注">
          <template scope="scope">
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submits">确定</el-button>
        <el-button @click="dialog_visible = false">取消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>

  import ElButton from "../../../node_modules/element-ui/packages/button/src/button.vue";


  export default {
    props: {

    },
    components: {ElButton},
    data() {
      return {
        dialog_visible: false,
        searchList: {},
        multipleSelection: [],
        pl88: '',
        testData: [{id: "201", name: "配方管理员", description: '备件1'}, {id: "106", name: "长晶工", description: "备件2"}],
      }

    },
    computed: {

    },
    created() {



    },
    methods: {
      openDialog() {
        this.dialog_visible = true;
      },
      submits() {
        this.dialog_visible = false;
        this.$emit("input", this.multipleSelection);
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      },
    },
    watch: {
      value(v) {
      },
      innerValue(v) {

      }
    }
  }
</script>
